package day04;

public class Books {

    private String  bookName;//书名
    private String author;//作者
    private String publisher;//出版社名
    private double price;//价格


    public Books() {//构造空参
    }

    public Books(String bookName, String author, String publisher, double price) {//构造有参
        this.bookName = bookName;
        this.author = author;
        this.publisher = publisher;
        this.price = price;
    }
    public String getBookName() {
        return bookName;
    }
    public void setBookName(String bookName) {
        this.bookName = bookName;
    }
    public String getAuthor() {
        return author;
    }
    public void setAuthor(String author) {
        this.author = author;
    }
    public String getPublisher() {
        return publisher;
    }
    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }
    public double isPrice() {
        return price;
    }
    public void setPrice(double price) {
        this.price = price;
    }
    public void setBookinfo(String bookName, String author, String publisher, double price){
        this.bookName = bookName;
        this.author = author;
        this.publisher = publisher;
        this.price = price;
    }

    public String getBookinfo() {
        return "书名： " + bookName + ", 作者： " + author + ", 出版社名：  " + publisher + ", 价格：  " + price + "";
    }
}
